﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace InkjetControl.bean
{
    /*
    {
	    "inkCylinder": 1,
	    "flightTime": 40,
	    "isPhaseFailure": false,
	    "isHighVoltageFailure": false,
	    "pressure": 0,
	    "printCount": 0,
	    "highVoltage": 0,
	    "supplyInkState": 0,
	    "solventCylinder": 1,
	    "phaseAngle": 0,
	    "isPhaseChargingFailure": false,
	    "mixCylinder": 2,
	    "phaseValue": 0,
	    "viscosityCylinder": 1,
	    "chassisTemp": 42.666668,
	    "viscosity": 0,
	    "isNozzleCoverFailure": false,
	    "mixTemp": 5.666666,
	    "isRecycleFailure": false,
	    "nozzleTemp": 25.0,
	    "printDone": 0,
	    "devState": 0
    }
    */
    public class StatusBean
    {
        // 相位
        [JsonProperty("phaseValue")]
        public int PhaseValue { get; set; }
        // 相位角
        [JsonProperty("phaseAngle")]
        public int PhaseAngle { get; set; }
        // 粘度
        [JsonProperty("viscosity")]
        public int Viscosity { get; set; }
        // 高压
        [JsonProperty("highVoltage")]
        public int HighVoltage { get; set; }
        // 压力
        [JsonProperty("pressure")]
        public int Pressure { get; set; }

        //墨水缸
        [JsonProperty("inkCylinder")]
        public int InkCylinder { get; set; }
        //粘度缸
        [JsonProperty("viscosityCylinder")]
        public int ViscosityCylinder { get; set; }
        //溶剂缸
        [JsonProperty("solventCylinder")]
        public int SolventCylinder { get; set; }
        //混合缸
        [JsonProperty("mixCylinder")]
        public int MixCylinder { get; set; }

        // 飞行时间
        [JsonProperty("flightTime")]
        public long FlightTime { get; set; }

        // 混合缸温度
        [JsonProperty("mixTemp")]
        public float MixTemp { get; set; }
        // 喷头温度
        [JsonProperty("nozzleTemp")]
        public float NozzleTemp { get; set; }
        // 机箱温度
        [JsonProperty("chassisTemp")]
        public float ChassisTemp { get; set; }

        // 供墨状态
        [JsonProperty("supplyInkState")]
        public int SupplyInkState { get; set; }

        [JsonProperty("isNozzleCoverFailure")]
        public bool IsNozzleCoverFailure { get; set; }
        [JsonProperty("isHighVoltageFailure")]
        public bool IsHighVoltageFailure { get; set; }
        [JsonProperty("isPhaseChargingFailure")]
        public bool IsPhaseChargingFailure { get; set; }
        [JsonProperty("isPhaseFailure")]
        public bool IsPhaseFailure { get; set; }
        [JsonProperty("isRecycleFailure")]
        public bool IsRecycleFailure { get; set; }

        [JsonProperty("devState")]
        public int DevState { get; set; }

        [JsonProperty("printDone")]
        public bool PrintDone { get; set; }
        [JsonProperty("printCount")]
        public int PrintCount { get; set; }

        public override string ToString()
        {
            return "{PhaseValue:" + PhaseValue + ", devState:" + DevState +  "}";
        }
    }
}
